package com.example.shop_2212.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.base.entity.CouponEntity
import com.example.shop_2212.R

class CouponAdapter:BaseQuickAdapter<CouponEntity,BaseViewHolder>(R.layout.item_coupon) {
    override fun convert(holder: BaseViewHolder, item: CouponEntity) {
        holder.setText(R.id.tv_price,"￥${item.money}")
        holder.setText(R.id.tv_minprice,"满${item.minPrice}可用")
        if(item.isUse){
            holder.setText(R.id.tv_get,"已领取")
        }else{
            holder.setText(R.id.tv_get,"领取")
        }
    }
}